﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace CitizenDiary.Sync.Contract
{
    [DataContract]
    public class SynchronizeRequest
    {
        //[DataMember]
        //public IEnumerable<UploadItem> UploadItems { get; set; }

        [DataMember]
        public string Token { get; set; }

        [DataMember]
        public SynchronizationCollection SynchronizationItems { get; set; }

        [DataMember]
        public Guid DeviceID { get; set; }

        //[DataMember]
        //public IDictionary<Guid, RestItem> RestItems { get; set; }

        //[DataMember]
        //public IEnumerable<Guid> MustDownloadIDs { get; set; }

        public SynchronizeRequest()
        {
            SynchronizationItems = new SynchronizationCollection();

            //UploadItems = new List<UploadItem>();
            //MustDownloadIDs = new List<Guid>();
            //RestItems = new Dictionary<Guid, RestItem>();
        }

        //[DataContract]
        //public class UploadItem
        //{
        //    [DataMember]
        //    public bool IsNew { get; set; }

        //    [DataMember]
        //    public Guid ID { get; set; }

        //    [DataMember]
        //    public string Content { get; set; }

        //    [DataMember]
        //    public long UpdatedVersion { get; set; }

        //    [DataMember]
        //    public Guid UpdatedDeviceID { get; set; }

        //    [DataMember]
        //    public bool IsDeleted { get; set; }
        //}

        //[DataContract]
        //public class RestItem
        //{
        //    [DataMember]
        //    public long UpdatedVersion { get; set; }

        //    [DataMember]
        //    public Guid UpdatedDeviceID { get; set; }
        //}
    }
}
